package com.ruoyi.fallback;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.domain.Community;
import com.ruoyi.service.CommService;
import com.ruoyi.service.RidService;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 文件服务降级处理
 * 
 * @author ruoyi
 */
@Component
public class CommServiceFallbackFactory implements FallbackFactory<CommService>
{

    @Override
    public CommService create(Throwable throwable) {

     return new CommService() {

         @Override
         public AjaxResult getInfo(Long id) {
             return AjaxResult.error("基础信息服务不可用请稍候");

         }

         @Override
         public AjaxResult edit(Community community) {
             return AjaxResult.error("基础信息服务不可用请稍候");
         }
     };
    }
}
